// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `runtime_parachains::hrmp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --pallet=runtime_parachains::hrmp
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `runtime_parachains::hrmp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInfo<T> {
	/// Storage: Paras ParaLifecycles (r:2 w:0)
	/// Proof Skipped: Paras ParaLifecycles (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannels (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpEgressChannelsIndex (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpEgressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
	fn hrmp_init_open_channel() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `350`
		//  Estimated: `6290`
		// Minimum execution time: 37_901_000 picoseconds.
		Weight::from_parts(38_728_000, 0)
			.saturating_add(Weight::from_parts(0, 6290))
			.saturating_add(T::DbWeight::get().reads(9))
			.saturating_add(T::DbWeight::get().writes(5))
	}
	/// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Paras ParaLifecycles (r:1 w:0)
	/// Proof Skipped: Paras ParaLifecycles (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpIngressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpAcceptedChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
	fn hrmp_accept_open_channel() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `582`
		//  Estimated: `4047`
		// Minimum execution time: 37_634_000 picoseconds.
		Weight::from_parts(38_332_000, 0)
			.saturating_add(Weight::from_parts(0, 4047))
			.saturating_add(T::DbWeight::get().reads(6))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	/// Storage: Hrmp HrmpChannels (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpCloseChannelRequests (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpCloseChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpCloseChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpCloseChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
	/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
	fn hrmp_close_channel() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `453`
		//  Estimated: `3918`
		// Minimum execution time: 33_719_000 picoseconds.
		Weight::from_parts(34_342_000, 0)
			.saturating_add(Weight::from_parts(0, 3918))
			.saturating_add(T::DbWeight::get().reads(5))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	/// Storage: Hrmp HrmpIngressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpIngressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpEgressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpEgressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannels (r:254 w:254)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpAcceptedChannelRequestCount (r:0 w:1)
	/// Proof Skipped: Hrmp HrmpAcceptedChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannelContents (r:0 w:254)
	/// Proof Skipped: Hrmp HrmpChannelContents (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestCount (r:0 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// The range of component `i` is `[0, 127]`.
	/// The range of component `e` is `[0, 127]`.
	fn force_clean_hrmp(i: u32, e: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `197 + e * (100 ±0) + i * (100 ±0)`
		//  Estimated: `3659 + e * (2575 ±0) + i * (2575 ±0)`
		// Minimum execution time: 1_267_013_000 picoseconds.
		Weight::from_parts(1_283_708_000, 0)
			.saturating_add(Weight::from_parts(0, 3659))
			// Standard Error: 118_117
			.saturating_add(Weight::from_parts(3_722_255, 0).saturating_mul(i.into()))
			// Standard Error: 118_117
			.saturating_add(Weight::from_parts(3_701_842, 0).saturating_mul(e.into()))
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into())))
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(e.into())))
			.saturating_add(T::DbWeight::get().writes(4))
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into())))
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(e.into())))
			.saturating_add(Weight::from_parts(0, 2575).saturating_mul(e.into()))
			.saturating_add(Weight::from_parts(0, 2575).saturating_mul(i.into()))
	}
	/// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequests (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Paras ParaLifecycles (r:256 w:0)
	/// Proof Skipped: Paras ParaLifecycles (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpIngressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpIngressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpEgressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpEgressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestCount (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpAcceptedChannelRequestCount (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpAcceptedChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannels (r:0 w:128)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// The range of component `c` is `[0, 128]`.
	fn force_process_hrmp_open(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `425 + c * (136 ±0)`
		//  Estimated: `1880 + c * (5086 ±0)`
		// Minimum execution time: 6_798_000 picoseconds.
		Weight::from_parts(6_921_000, 0)
			.saturating_add(Weight::from_parts(0, 1880))
			// Standard Error: 12_517
			.saturating_add(Weight::from_parts(21_683_294, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(c.into())))
			.saturating_add(T::DbWeight::get().writes(1))
			.saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 5086).saturating_mul(c.into()))
	}
	/// Storage: Hrmp HrmpCloseChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpCloseChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannels (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpEgressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpEgressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpIngressChannelsIndex (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpIngressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpCloseChannelRequests (r:0 w:128)
	/// Proof Skipped: Hrmp HrmpCloseChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannelContents (r:0 w:128)
	/// Proof Skipped: Hrmp HrmpChannelContents (max_values: None, max_size: None, mode: Measured)
	/// The range of component `c` is `[0, 128]`.
	fn force_process_hrmp_close(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `268 + c * (124 ±0)`
		//  Estimated: `1728 + c * (2600 ±0)`
		// Minimum execution time: 5_695_000 picoseconds.
		Weight::from_parts(5_776_000, 0)
			.saturating_add(Weight::from_parts(0, 1728))
			// Standard Error: 11_189
			.saturating_add(Weight::from_parts(13_477_149, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into())))
			.saturating_add(T::DbWeight::get().writes(1))
			.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 2600).saturating_mul(c.into()))
	}
	/// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// The range of component `c` is `[0, 128]`.
	fn hrmp_cancel_open_request(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `959 + c * (13 ±0)`
		//  Estimated: `4228 + c * (15 ±0)`
		// Minimum execution time: 21_141_000 picoseconds.
		Weight::from_parts(29_731_969, 0)
			.saturating_add(Weight::from_parts(0, 4228))
			// Standard Error: 3_263
			.saturating_add(Weight::from_parts(198_283, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads(3))
			.saturating_add(T::DbWeight::get().writes(3))
			.saturating_add(Weight::from_parts(0, 15).saturating_mul(c.into()))
	}
	/// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequests (r:128 w:128)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// The range of component `c` is `[0, 128]`.
	fn clean_open_channel_requests(c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `176 + c * (63 ±0)`
		//  Estimated: `1655 + c * (2538 ±0)`
		// Minimum execution time: 4_573_000 picoseconds.
		Weight::from_parts(5_593_572, 0)
			.saturating_add(Weight::from_parts(0, 1655))
			// Standard Error: 4_134
			.saturating_add(Weight::from_parts(3_565_821, 0).saturating_mul(c.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
			.saturating_add(T::DbWeight::get().writes(1))
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
			.saturating_add(Weight::from_parts(0, 2538).saturating_mul(c.into()))
	}
	/// Storage: Paras ParaLifecycles (r:2 w:0)
	/// Proof Skipped: Paras ParaLifecycles (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequests (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpChannels (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpChannels (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpEgressChannelsIndex (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpEgressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpOpenChannelRequestsList (max_values: Some(1), max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueues (r:2 w:2)
	/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
	/// Storage: Dmp DownwardMessageQueueHeads (r:2 w:2)
	/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpIngressChannelsIndex (r:1 w:0)
	/// Proof Skipped: Hrmp HrmpIngressChannelsIndex (max_values: None, max_size: None, mode: Measured)
	/// Storage: Hrmp HrmpAcceptedChannelRequestCount (r:1 w:1)
	/// Proof Skipped: Hrmp HrmpAcceptedChannelRequestCount (max_values: None, max_size: None, mode: Measured)
	fn force_open_hrmp_channel(_c: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `350`
		//  Estimated: `6290`
		// Minimum execution time: 53_253_000 picoseconds.
		Weight::from_parts(55_141_000, 0)
			.saturating_add(Weight::from_parts(0, 6290))
			.saturating_add(T::DbWeight::get().reads(13))
			.saturating_add(T::DbWeight::get().writes(8))
	}
}
